//
//  SGJTaskCell.m
//  Sewage
//
//  Created by 优聚泰元 on 2017/6/7.
//  Copyright © 2017年 宗庆猛. All rights reserved.
//

#import "SGJTaskCell.h"

@interface SGJTaskCell ()
@property (weak, nonatomic) IBOutlet UIButton *quitTaskButton;
@property (weak, nonatomic) IBOutlet UIButton *startTaskButton;

@property (weak, nonatomic) IBOutlet UILabel *nameLabel;


@end

@implementation SGJTaskCell
- (IBAction)quitTaskButtonClick:(UIButton *)sender {
    if ([self.delegate respondsToSelector:@selector(quitTaskWithTaskCell:)]) {
        [self.delegate quitTaskWithTaskCell:self];
    }
}
- (IBAction)startTaskButtonClick:(UIButton *)sender {
    if ([self.delegate respondsToSelector:@selector(startTaskWithTaskCell:)]) {
        [self.delegate startTaskWithTaskCell:self];
    }
}

-(void)setGrabOrderModel:(SGJGrabOrderModel *)grabOrderModel{
    _grabOrderModel = grabOrderModel;
    
    self.nameLabel.text = grabOrderModel.name;
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    
    self.quitTaskButton.layer.borderWidth = 1;
    self.quitTaskButton.layer.borderColor = [UIColor blueColor].CGColor;
    self.quitTaskButton.layer.cornerRadius = 15;
    self.quitTaskButton.clipsToBounds = YES;
    
    self.startTaskButton.layer.cornerRadius = 15;
    self.startTaskButton.clipsToBounds = YES;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
